home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-04-18 | 2.7 KB | 84 lines | [TEXT/MMCC] |
- // Required headers.
- #ifndef __DIALOGS__
- #include <Dialogs.h>
- #endif
-
- #ifndef __TOOLUTILS__
- #include <ToolUtils.h>
- #endif
-
- #ifndef __PROCESSES__
- #include <Processes.h>
- #endif
-
- #ifndef __FONTS__
- #include <Fonts.h>
- #endif
-
- #ifndef __APPLEEVENTS__
- #include <AppleEvents.h>
- #endif
-
- #ifndef __RESOURCES__
- #include <Resources.h>
- #endif
-
- #ifndef __GESTALT__
- #include <Gestalt.h>
- #endif
-
- #ifndef __TRAPS__
- #include <Traps.h>
- #endif
-
- // ----------------------------------------------------------------------------------
- #define kCntlActivate 0 /* enabled control’s hilite state */
- #define kCntlDeactivate 0xFF /* disabled control’s hilite state */
- #define kButtonFrameSize 3 /* button frame’s pen size */
- #define kButtonFrameInset (-4) /* inset rectangle adjustment around button */
-
- extern short gQDVersion; /* major QD version #; 0 for original,
- 1 for color QD, 2 for 32-bit QD */
- extern short gInitMPDUtils;
-
- // ******************** Dialog & Window
- Boolean GetCheckOrRadio(DialogPtr dlgPtr, short itemNo);
- void ToggleCheck(DialogPtr dlgPtr, short chkItem);
- void SetCheckOrRadioButton(DialogPtr dlgPtr, short itemNo, short state);
- void OutlineDialogItem(DialogPtr dlgPtr, short item);
- void OutlineControl(ControlHandle button);
- DialogPtr GetCenteredDialog(short id, DialogPtr storage, WindowPtr relatedWindow, WindowPtr behind);
- Rect CenterWindow(WindowPtr window, WindowPtr relatedWindow, Rect sizeInfo);
- OSErr SimpleCanDialog(void);
- void UseControlStyle(ControlHandle ctl);
- void DoDraw1Control(ControlHandle ctl, Boolean scrollBarsOnly);
- void ShowStyledControl(ControlHandle ctl);
- Boolean IsScrollBar(ControlHandle ctl);
- short GetButtonVariant(ControlHandle ctl);
- Boolean GetControlStyle(ControlHandle ctl, void *cinfo);
- Boolean WhichControl(Point mouseLoc, long when, WindowPtr window, ControlHandle *ctlHit);
-
- // ******************** Rectangle & Point
- Rect GetWindowContentRect(WindowPtr window);
- Rect GetWindowStructureRect(WindowPtr window);
- Point GetGlobalTopLeft(WindowPtr window);
- void LocalToGlobalRect(Rect *aRect);
- void PositionRectInRect(Rect outerRect, Rect *innerRect, Fixed horzRatio, Fixed vertRatio);
-
- // ******************** Miscelaneous
- char LockHandleHigh(Handle theHandle);
- short GetHexByte(char *cptr);
- Handle GetAppResource(ResType theType, short theID, OSErr *err);
- Boolean TrapExists(short theTrap);
- short NumToolboxTraps(void);
- TrapType GetTrapType(short theTrap);
- void InitMPDUtils(void);
-
- // ******************** Window Centering Support
- Rect GetWindowDeviceRectNMB(WindowPtr window);
- Rect GetWindowDeviceRect(WindowPtr window);
- Rect GetMainScreenRect(void);
- GDHandle GetRectDevice(Rect globalRect);
- RgnHandle LocalScreenDepthRegion(short depth);
- RgnHandle ScreenDepthRegion(short depth);
-